﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls1="clr-namespace:Microsoft.Live.Controls;assembly=Microsoft.Live.Controls"
                    xmlns:holdem="clr-namespace:Holdem.Core.Controls;assembly=Holdem.Core" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
                    xmlns:MvvmLite="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP71"
                    xmlns:tkpr="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit"
                    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ControlStyle.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <ControlTemplate x:Key="THCTextboxEntry" TargetType="TextBox">
        <Grid x:Name="grid" Width="274" Height="55"
              Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="MouseOver" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EnabledBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledOrReadonlyBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ReadOnly">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EnabledBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledOrReadonlyBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledOrReadonlyBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneSubtleBrush}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledOrReadonlyBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneSubtleBrush}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EnabledBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneContrastBackgroundBrush}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EnabledBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneContrastBackgroundBrush}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unfocused" />
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="EnabledBorder"
                    Width="{Binding Width,
                                    ElementName=grid}"
                    Margin="0" HorizontalAlignment="Center"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{StaticResource PhoneAccentBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2">
                <ScrollViewer x:Name="ContentElement" BorderThickness="0"
                              Padding="{TemplateBinding Padding}"
                              Template="{StaticResource PhoneScrollViewerNoScrollBars}" />
            </Border>
            <Border x:Name="DisabledOrReadonlyBorder"
                    Width="{Binding Width,
                                    ElementName=grid}"
                    HorizontalAlignment="Center" Background="Transparent"
                    BorderBrush="{StaticResource PhoneDisabledBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2" Visibility="Collapsed">
                <TextBox Background="Transparent"
                         Foreground="{StaticResource PhoneDisabledBrush}"
                         IsReadOnly="True"
                         SelectionBackground="{TemplateBinding SelectionBackground}"
                         SelectionForeground="{TemplateBinding SelectionForeground}"
                         Template="{StaticResource PhoneDisabledTextBoxTemplate}"
                         Text="{TemplateBinding Text}"
                         TextAlignment="{TemplateBinding TextAlignment}"
                         TextWrapping="{TemplateBinding TextWrapping}" />
            </Border>
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="PlayerCountPopBorder">
        <Border Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="PlayersPopupHeader" Grid.Row="0" Grid.Column="0"
                           Grid.ColumnSpan="4"
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Select No. Players" />
                <tkpr:LoopingSelector x:Name="PlayersSelector" Grid.Row="1"
                                      DataSource="{Binding PlayersData}"
                                      ItemMargin="5" ItemSize="170, 65"
                                      Style="{StaticResource LoopingSelectorStyle}" />
                <Button x:Name="PlayersPopupSelectButton" Grid.Row="2" Grid.Column="0"
                        Grid.ColumnSpan="4" Width="48" Height="48"
                        HorizontalAlignment="Center"
                        Style="{StaticResource RoundButtonCircleStyle}">
                    <Image x:Name="ImagePlayersSelect" Source="../Images/Icons/48/appbar.check.rest.png" />
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="PlayersVisibilitySelectCommand" Command="{Binding VisibilityCommand}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="SelectedKickerPopupBorder">
        <Border x:Name="KickerBorder" Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="StatsKickerPopupHeader" Grid.Row="0" Grid.Column="0"
                           Grid.ColumnSpan="4"
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Select Kicker" />
                <holdem:HoldemKickerSelector x:Name="KickerSelector" Grid.Row="1" HorizontalAlignment="Stretch"
                                             VerticalAlignment="Stretch"
                                             DataContext="{Binding Path=Kickers}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="SelectedKickerCommand" Command="{Binding ElementName=KickerBorder, Path=DataContext.SelectedCardCommand}" PassEventArgsToCommand="True" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </holdem:HoldemKickerSelector>
                <Button x:Name="PopupSelectButton" Grid.Row="2" Grid.ColumnSpan="4"
                        Width="48" Height="48" HorizontalAlignment="Center"
                        Style="{StaticResource RoundButtonCircleStyle}">
                    <Image x:Name="ImageHandSelect" Source="../Images/Icons/48/appbar.check.rest.png" />
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="VisibilitySelectCommand" Command="{Binding Visibility1Command}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Key="SelectedOutsPopupBorder">
        <Border x:Name="OutSelectionPopup" Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="OutsPopupHeader" Grid.Row="0" Grid.Column="0"
                           Grid.ColumnSpan="4"
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Select No. Outs" />
                <tkpr:LoopingSelector x:Name="OutSelector" Grid.Row="1"
                                      DataSource="{Binding OutsData}"
                                      ItemMargin="5" ItemSize="170, 65"
                                      Style="{StaticResource LoopingSelectorStyle}" />
                <Button x:Name="OutsPopupSelectButton" Grid.Row="2" Grid.ColumnSpan="4"
                        Width="48" Height="50" HorizontalAlignment="Center"
                        Style="{StaticResource RoundButtonCircleStyle}">
                    <Image x:Name="ImageOutsSelect" Source="../Images/Icons/48/appbar.check.rest.png" />
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="OutsVisibilitySelectCommand" Command="{Binding OutsVisibilityCommand}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="PrecisionSelectionPopup">
        <Border Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="PrecisionPopupHeader" Grid.Row="0" Grid.Column="0"
                           Grid.ColumnSpan="4"
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Select Digit Precision" />
                <tkpr:LoopingSelector x:Name="OutSelector" Grid.Row="1"
                                      DataSource="{Binding PrecisionData}"
                                      ItemMargin="5" ItemSize="160, 80"
                                      Style="{StaticResource LoopingSelectorStyle}" />
                <Button x:Name="PrecisionPopupSelectButton" Grid.Row="2" Grid.ColumnSpan="4"
                        Width="48" Height="50" HorizontalAlignment="Center"
                        Style="{StaticResource RoundButtonCircleStyle}">
                    <Image x:Name="ImagePrecisionSelect" Source="../Images/Icons/48/appbar.check.rest.png" />
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="OutsVisibilitySelectCommand" Command="{Binding VisibilityCommand}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="NumberOfPlayersSelectionPopup">
        <Border Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="PrecisionPopupHeader" Grid.Row="0" Grid.Column="0"
                           Grid.ColumnSpan="4"
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Select No. Players" />
                <tkpr:LoopingSelector x:Name="OutSelector" Grid.Row="1"
                                      DataSource="{Binding PlayersData}"
                                      ItemMargin="5" ItemSize="160, 80"
                                      Style="{StaticResource LoopingSelectorStyle}" />
                <Button x:Name="PrecisionPopupSelectButton" Grid.Row="2" Grid.ColumnSpan="4"
                        Width="48" Height="50" HorizontalAlignment="Center"
                        Style="{StaticResource RoundButtonCircleStyle}">
                    <Image x:Name="ImagePrecisionSelect" Source="../Images/Icons/48/appbar.check.rest.png" />
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="OutsVisibilitySelectCommand" Command="{Binding Visibility2Command}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="DeletingHandsPopup">
        <Border Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="PrecisionPopupHeader" 
                           Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" 
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Deleting Hands" />
                <toolkit:PerformanceProgressBar Grid.Row="1" IsIndeterminate="True"/>
                
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="SearchFilterSelectionPopup">
        <Border Style="{StaticResource PopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="150" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="OptionsFilterHeaderTextBlock" Grid.Row="1"
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Select Search Filter" />
                <ListBox x:Name="OptionsSearchFilterListBox" Grid.Row="2" Grid.RowSpan="3"
                         Grid.Column="1"
                         ItemContainerStyle="{StaticResource RadioButtonListItemStyle}"
                         ItemsSource="{Binding SearchFilter}"
                         SelectedItem="{Binding SelectedSearchFilter,
                                                Mode=TwoWay}"
                         Style="{StaticResource THCStatsKickerListBoxTemplate}" />
                <Button x:Name="PopupCancelSearchButton" Grid.Row="4" Grid.RowSpan="2"
                        Grid.ColumnSpan="2" Width="48" Height="50"
                        Content="Cancel"
                        Style="{StaticResource RoundButtonStyle}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="VisibilityOffCommand" Command="{Binding VisibilityCommand}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="ReplayEnigneSelectionPopup">
        <Border Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="OptionsEngineHeaderTextBlock" Grid.Row="0" Grid.Column="0"
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Select Replay Engine" />
                <ListBox x:Name="OptionsReplayEngineListBox" Grid.Row="1"
                         ItemContainerStyle="{StaticResource RadioButtonListItemStyle}"
                         ItemsSource="{Binding AvailableEngines}"
                         SelectedItem="{Binding SelectedReplayEngine,
                                                Mode=TwoWay}"
                         Style="{StaticResource THCStatsKickerListBoxTemplate}" />
                <Button x:Name="PopupCancelEngineButton" Grid.Row="2" Width="48"
                        Height="50" HorizontalAlignment="Center"
                        Style="{StaticResource RoundButtonCircleStyle}">
                    <Image x:Name="ImageOutsSelect" Source="../Images/Icons/48/appbar.check.rest.png" />
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="VisibilityEngineOffCommand" Command="{Binding Visibility1Command}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="CardHandControlTemplate">
        <StackPanel Orientation="Horizontal">
            <ItemsControl>
                <DataTemplate>
                    <Image Source="{Binding CardImage}" Style="{StaticResource THCCardStyle}" />
                </DataTemplate>
            </ItemsControl>
        </StackPanel>
    </ControlTemplate>

    <ControlTemplate x:Name="HistoryPopupBorder">
        <Border Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock Grid.Row="1" VerticalAlignment="Stretch"
                           FontSize="{StaticResource PhoneFontSizeLarge}"
                           Foreground="{StaticResource PhoneForegroundBrush}"
                           LineStackingStrategy="BlockLineHeight">
                    <Run Text="        No hands were found." />
                    <LineBreak />
                    <LineBreak />
					<Run Text="In the settings menu:" />
					<LineBreak />
                    <Run Text=" * Set the replay engine to" />
					<LineBreak />
					<Run Text="   'THC Hand History'" />
                    <LineBreak />
                    <Run Text=" * Set 'Write Hand History' on" />
                    <LineBreak />
                    <Run Text=" * Generate new hands in main" />
                </TextBlock>
                <Button x:Name="HandNotLoadedSelectButton" Grid.Row="2" Width="48"
                        Height="50" HorizontalAlignment="Center"
                        Style="{StaticResource RoundButtonCircleStyle}">
                    <Image x:Name="ImageOutsSelect" Source="../Images/Icons/48/appbar.check.rest.png" />
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="HistoryVisibilitySelectCommand" Command="{Binding VisibilityCommand}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="StartingHandsPopupBorder">
        <Border Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock Grid.Row="1" VerticalAlignment="Stretch"
                           FontSize="{StaticResource PhoneFontSizeLarge}"
                           Foreground="{StaticResource PhoneForegroundBrush}"
                           LineStackingStrategy="BlockLineHeight" Text="This application uses custom hands stored in your SkyDrive account.  You need to log in to open and store them  on your device." TextAlignment="Center"
                           TextWrapping="Wrap" />
                <Controls1:SignInButton x:Name="SkyDriveSignInButton" Grid.Row="1" Width="160"
                                        Height="80" Branding="Skydrive"
                                        ClientId="{Binding ClientId}"
                                        DataContext="{Binding Source={StaticResource Locator},
                                                              Path=SecurityProvider}"
                                        RedirectUri="{Binding RedirectUri}"
                                        Scopes="{Binding Scopes}"
                                        TextType="SignIn">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SessionChanged">
                            <MvvmLite:EventToCommand Command="{Binding SessionChangedCommand}" PassEventArgsToCommand="True" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Controls1:SignInButton>
                <Button x:Name="HandNotLoadedSelectButton" Grid.Row="2" Width="48"
                        Height="50" HorizontalAlignment="Center"
                        Style="{StaticResource RoundButtonCircleStyle}">
                    <Image x:Name="ImageOutsSelect" Source="../Images/Icons/48/appbar.close.rest.png" />
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <MvvmLite:EventToCommand x:Name="StartingHandsVisibilityCommand" Command="{Binding VisibilityCommand}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            </Grid>
        </Border>
    </ControlTemplate>

    <ControlTemplate x:Name="SkyDriveDownloadConfirmationPopup">
        <Border Style="{StaticResource OutsPopupBorderStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="65" />
                    <RowDefinition />
                    <RowDefinition Height="80" />
                </Grid.RowDefinitions>

                <TextBlock x:Name="SkyDriveDownloadConfirmationHeaderTextBlock" 
                           Grid.Row="0" Grid.Column="0"
                           Style="{StaticResource THCStatsLargeHeaderText}"
                           Text="Download File?" />
                <TextBlock Grid.Row="1" VerticalAlignment="Center"
                           FontSize="{StaticResource PhoneFontSizeLarge}"
                           Foreground="{StaticResource PhoneForegroundBrush}"
                           TextAlignment="Center"
                           TextWrapping="Wrap">
                    <Run Text="Downloading files will use data and store this file on your device." />
                    <LineBreak />
                    <LineBreak />
					<Run Text="Files can be deleted by pressing and holding the selection on the starting hands selection page." />
					<LineBreak />
                    <LineBreak />
                    <Run Text="Currently only xml files are supported." />
                    <LineBreak />
                    <LineBreak />
                    <Run Text="Continue?" />
                </TextBlock>
                <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
                    <Button x:Name="SkyDriveDownloadConfirmButton" 
                            Width="48"
                            Height="50" HorizontalAlignment="Center"
                            Style="{StaticResource RoundButtonCircleStyle}">
                        <Image x:Name="SkyDriveConfirmImage" Source="../Images/Icons/48/appbar.check.rest.png" />
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Click">
                                <MvvmLite:EventToCommand x:Name="SkyDriveDownloadConfirmCommand" 
                                                         Command="{Binding SkyDriveFileDownloadConfirmedCommand}" />
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </Button>
                    <Button x:Name="SkyDriveDownloadCancelButton" 
                            Width="48"
                            Height="50" HorizontalAlignment="Center"
                            Style="{StaticResource RoundButtonCircleStyle}" Margin="50,0,0,0">
                        <Image x:Name="SkyDriveCancelImage" Source="../Images/Icons/48/appbar.close.rest.png" />
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Click">
                                <MvvmLite:EventToCommand x:Name="SkyDriveDownloadCancelCommand" 
                                                         Command="{Binding Visibility1Command}" />
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </Button>
                </StackPanel>
            </Grid>
        </Border>
    </ControlTemplate>

</ResourceDictionary>
